<?  // Namo WebEditor dbWizard Script.
    // Copyright 1999-2003 Sejoong Namo Interacive Inc., All Rights Reserved.
    // Do not modify this block.

    // block_name  : 
    // block_type  : page header

    // target      : Windows, php, ODBC
    // page_type   : modify
    // arg         : emplacements.num, int, post, field
    // arg         : emplacements.emplacement, int, post, field
    // arg         : emplacements.identifiant, string, post, field
    // arg         : processmode, int, post, page
    $chaine = $_GET[chaine];
    $a_emplacements_num = ( int ) $_POST[emplacements_num];
    $a_emplacements_emplacement = $_POST[emplacements_emplacement];
    $a_emplacements_identifiant = $_POST[emplacements_identifiant];
    $a_processmode = $_POST[processmode];
    
    if ($a_processmode != 0) {
    	$w_checknull = 0;
  
    	if (empty($a_emplacements_num)) {
    		$w_checknull = 1;
    		echo("emplacements.num is NULL</p>");
    	}
    
    	if ($w_checknull != 0) {
    		echo("NULL is not allowed.");
    		exit;
    	} else {
    		 header("Location:inscriptionvg.php?chaine=$chaine");
    	}
    }
    
    $a_emplacements_identifiant = str_replace("'", "''", stripslashes($a_emplacements_identifiant));
    
    require('wed_php_odbc.inc');

    // checksum    : 3911
?><html>

<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<title>Sans titre</title>
<meta name="generator" content="Namo WebEditor v6.0">
</head>

<body bgcolor="white" text="black" link="blue" vlink="purple" alink="red">
</p>
<table border="1">
    <tr>
        <td width="1215">
            <p align="center"><b><font size="6">Réservation :</font><font size="6" color="red"><?php echo $chaine; ?></font></b></p>

<?  // Namo WebEditor dbWizard Script.
    // Copyright 1999-2003 Sejoong Namo Interacive Inc., All Rights Reserved.
    // Do not modify this block.

    // block_name  : Bloc de présentation
    // block_type  : view

    // server      : Vgreniers
    // userid      : 
    // passwd      : 
    // table       : inscriptions
    // where_cond  : inscriptions.identifiant='$chaine'
    // field       : inscriptions.identifiant, string, null, 10
    // field       : inscriptions.Prenom, string, null, 50
    // field       : inscriptions.NomFamille, string, null, 50
    // field       : inscriptions.AdresseCourrierElec, string, null, 50

    $w_sqlstr = "SELECT inscriptions.identifiant, inscriptions.Prenom, inscriptions.NomFamille, inscriptions.AdresseCourrierElec FROM inscriptions WHERE (inscriptions.identifiant='$chaine')";
    wed_read_process ("Vgreniers", "", "", $w_sqlstr, $w_record);
    
    $f_inscriptions_identifiant = $w_record[0][0];
    $f_inscriptions_Prenom = $w_record[0][1];
    $f_inscriptions_NomFamille = $w_record[0][2];
    $f_inscriptions_AdresseCourrierElec = $w_record[0][3];

    // checksum    : 54230
?>            <table border="1" align="center">
                <tr>
                    <td width="598">

                        <p align="center"><b><font size="4"><?  // Namo WebEditor dbWizard Script.
                                                                // Copyright 1999-2003 Sejoong Namo Interacive Inc., All Rights Reserved.
                                                                // Do not modify this block.

                                                                // block_name  : Champ de sortie
                                                                // block_type  : write

                                                                // value       : <f,inscriptions.Prenom>
                                                                // cache       : "write value"

                                                                wed_write($f_inscriptions_Prenom);

                                                                // checksum    : 26888
                                                            ?>&nbsp;<?  // Namo WebEditor dbWizard Script.
                                                                  // Copyright 1999-2003 Sejoong Namo Interacive Inc., All Rights Reserved.
                                                                  // Do not modify this block.

                                                                  // block_name  : Champ de sortie
                                                                  // block_type  : write

                                                                  // value       : <f,inscriptions.NomFamille>
                                                                  // cache       : "write value"

                                                                  wed_write($f_inscriptions_NomFamille);

                                                                  // checksum    : 17813
                                                              ?></font></b></p>
                        <p align="center"><b><font size="4"><?  // Namo WebEditor dbWizard Script.
                                                                // Copyright 1999-2003 Sejoong Namo Interacive Inc., All Rights Reserved.
                                                                // Do not modify this block.

                                                                // block_name  : Champ de sortie
                                                                // block_type  : write

                                                                // value       : <f,inscriptions.AdresseCourrierElec>
                                                                // cache       : "write value"

                                                                wed_write($f_inscriptions_AdresseCourrierElec);

                                                                // checksum    : 60599
                                                            ?></font></b></p>
                    </td>
                </tr>
            </table>


        </td>
    </tr>
</table>
<p align="center"><b><font size="4">AJOUT D'UN EMPLACEMENT</font></b></p>
<form method="post">
<?  // Namo WebEditor dbWizard Script.
    // Copyright 1999-2003 Sejoong Namo Interacive Inc., All Rights Reserved.
    // Do not modify this block.

    // block_name  : Bloc de modification
    // block_type  : modify

    // server      : Vgreniers
    // userid      : 
    // passwd      : 
    // table       : emplacements
    // where_cond  : emplacements.identifiant= '0' 
    // field       : emplacements.num, int, not null, 0
    // field       : emplacements.emplacement, int, null, 0
    // field       : emplacements.identifiant, string, null, 10
    // result_url  : 

    if ($a_processmode != 0) {
    	$w_sqlstr = "UPDATE emplacements SET " . "identifiant = '" . "$chaine" . "' WHERE emplacements.num = $a_emplacements_num ";

    	wed_db_process("Vgreniers", "", "", $w_sqlstr);

    	echo("Les modifications sont terminées.");
    	exit;
    }
    $w_sqlstr = "SELECT emplacements.num, emplacements.emplacement, emplacements.identifiant FROM emplacements WHERE (emplacements.identifiant= '0' )";
    wed_read_process ("Vgreniers", "", "", $w_sqlstr, $w_record);
    
    $f_emplacements_num = $w_record[0][0];
    $f_emplacements_emplacement = $w_record[0][1];
    $f_emplacements_identifiant = $w_record[0][2];

    // checksum    : 46633
?><table border="1">
    <tr>
        <td width="605"> <p align="right"><b><font size="4">Liste des numéros d'emplacements libres</td>
            <td width="605"><?  // Namo WebEditor dbWizard Script.
                                // Copyright 1999-2003 Sejoong Namo Interacive Inc., All Rights Reserved.
                                // Do not modify this block.

                                // block_name  : Menu déroulant
                                // block_type  : input combo

                                // server      : Vgreniers
                                // userid      : 
                                // passwd      : 
                                // table       : emplacements
                                // where_cond  : emplacements.identifiant = '0'
                                // field       : emplacements.num, int, not null, 0
                                // field       : emplacements.emplacement, int, null, 0
                                // field       : emplacements.identifiant, string, null, 10
                                // arg_name    : emplacements.num
                                // value_field : emplacements.identifiant
                                // str_field   : emplacements.num
                                // cache       : "item1"
                                // cache       : "item2"
                                // cache       : "item3"
                                // cache       : "item4"
                                // cache       : "item5"

                                $w_sqlstr = "SELECT emplacements.num, emplacements.emplacement, emplacements.identifiant FROM emplacements WHERE (emplacements.identifiant = '0')";
                                wed_input_combo("Vgreniers", "", "", $w_sqlstr, "emplacements_num", 1, 0, WED_NULL_INT);

                                // checksum    : 42328
                            ?></td>
    </tr>
    <tr>
        <td width="1215" colspan="2"><p align="center"><input type="submit" value="Valider"><input type="hidden" name="processmode" value="1"></td>
    </tr>
</table>
</form>
<p align="left"><b><font size="2" color="grey">Votre adresse Ip est : <? echo $_SERVER['REMOTE_ADDR']; ?></font></b></p>
<p align="center"><img src="emplacements tm.jpg" width="800" height="741" border="0"></p>
<p>&nbsp;</p>
</body>

</html>
